home *** CD-ROM | disk | FTP | other *** search
/ Aminet 4 / Aminet 4 - November 1994.iso / aminet / comm / term / vltj5867.lha / VLT / rexx / VLTPhoneShow.rexx < prev    next >
OS/2 REXX Batch file  |  1994-03-27  |  2KB  |  79 lines

  1. /** VLTPhoneShow.rexx
  2. *
  3. *   Show an entry in the VLT phonebook
  4. *
  5. *   By W.G.J. Langeveld, February 1992.
  6. *
  7. **/
  8. /*
  9. *   Add libraries if necessary
  10. */
  11. if show("l", "rexxarplib.library") = 0 then do
  12.    check = addlib('rexxsupport.library', 0, -30, 0)
  13.    check = addlib('rexxarplib.library',  0, -30, 0)
  14. end
  15. /*
  16. *   Determine VLT port and screen name and size
  17. */
  18. vltport = address()
  19. cols = ScreenCols(vltport)
  20. if cols == -1 then do
  21.    vltscreen = ""
  22.    cols = ScreenCols()
  23.    rows = ScreenRows()
  24. end
  25. else do
  26.    vltscreen = vltport
  27.    rows = ScreenRows(vltscreen)
  28. end
  29. /*
  30. *   Check if we're set up right...
  31. */
  32. call pragma('W','NULL')
  33.  
  34. if ~exists("VLTPhoneBook:") then do
  35.    "@VLTPhoneSetup.rexx"
  36.    exit
  37. end
  38. /*
  39. *   Find out which entry
  40. */
  41. filename = GetFile(80, 50, "VLTPhoneBook:",, "Entry Name:", vltscreen)
  42. if filename == "" then exit
  43. /*
  44. *   Open the file
  45. */
  46. if open(input, filename, "r") = 0 then do
  47.    "message (Couldn't read file); delay 1.5; message"
  48.    exit
  49. end
  50. /*
  51. *   Read it
  52. */
  53. changes. = ""
  54. do i = 1 to 10
  55.    changes.i = readln(input)
  56.    if length(changes.i) > 47 then changes.i = substr(changes.i, 1, 47)
  57. end
  58. call close(input)
  59. /*
  60. *   Set up the strings
  61. */
  62. prompts =              "Name:          " || changes.1
  63. prompts = prompts ||  "\Address:       " || changes.2
  64. prompts = prompts ||  "\City etc.:     " || changes.3
  65. prompts = prompts || "\\Phone Number:  " || changes.4
  66. prompts = prompts ||  "\Modem Init:    " || changes.5
  67. prompts = prompts ||  "\Modem Speed:   " || changes.6
  68. prompts = prompts ||  "\Parity:        " || changes.7
  69. prompts = prompts ||  "\Predial Cmds:  " || changes.8
  70. prompts = prompts ||  "\PostDial Cmds: " || changes.9
  71. prompts = prompts || "\\Notes:         " || changes.10
  72. /*
  73. *   Put up the display
  74. */
  75. test = Request(cols - 600, rows - 170, prompts,,, " Okay ", vltscreen)
  76.  
  77. exit
  78.  
  79.